package cn.xq.pethome.base.service.impl;

import cn.xq.pethome.base.mapper.BaseMapper;
import cn.xq.pethome.base.query.BaseQuery;
import cn.xq.pethome.base.service.IBaseService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class BaseServiceimpl<T> implements IBaseService<T> {
  @Autowired
  private BaseMapper<T> baseMapper;
  @Override
  public void insert(T t) {
    baseMapper.insert(t);
  }

  @Override
  public void delete(Long id) {
    baseMapper.delete(id);
  }

  @Override
  public void update(T t) {
    baseMapper.update(t);
  }

  @Override
  public T findone(Long id) {
    return baseMapper.findone(id);
  }

  @Override
  public List<T> findall() {
    return baseMapper.findall();
  }

  @Override
  public List<T> findquery(BaseQuery baseQuery) {
    return baseMapper.findquery(baseQuery);
  }

  @Override
  public Long findqueryCount(BaseQuery baseQuery) {
    return baseMapper.findqueryCount(baseQuery);
  }
}
